part of '../index.dart';

class UserSearchModel {
  int? id;
  int? userId;
  String? userCode;
  String? nickname;
  int? gender;
  String? headPortraitsUrl;
  String? personalSignature;
  String? platformAuth;
  String? authDesc;
  String? platformAuthUrl;
  int? attentionType;

  UserSearchModel({
    this.id,
    this.userId,
    this.userCode,
    this.nickname,
    this.gender,
    this.headPortraitsUrl,
    this.personalSignature,
    this.platformAuth,
    this.authDesc,
    this.platformAuthUrl,
    this.attentionType,
  });

  UserSearchModel.fromJson(Map<String, dynamic> json) {
    id = int.tryParse('${json['id']}');
    userId = int.tryParse('${json['userId']}');
    userCode = json['userCode'];
    nickname = json['nickname'];
    gender = int.tryParse('${json['gender']}');
    headPortraitsUrl = json['headPortraitsUrl'];
    personalSignature = json['personalSignature'];
    platformAuth = json['platformAuth'];
    authDesc = json['authDesc'];
    platformAuthUrl = json['platformAuthUrl'];
    attentionType = int.tryParse('${json['attentionType']}');
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['userId'] = userId;
    data['userCode'] = userCode;
    data['nickname'] = nickname;
    data['gender'] = gender;
    data['headPortraitsUrl'] = headPortraitsUrl;
    data['personalSignature'] = personalSignature;
    data['platformAuth'] = platformAuth;
    data['authDesc'] = authDesc;
    data['platformAuthUrl'] = platformAuthUrl;
    data['attentionType'] = attentionType;
    return data;
  }
}
